home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-11-30 | 3.3 KB | 113 lines | [TEXT/MPS ] |
- ; File: Graf3D.a
- ;
- ; Copyright: © 1983-1993 by Apple Computer, Inc.
- ; All rights reserved.
- ;
- ; Version: System 7.1 for ETO #11
- ; Created: Tuesday, March 30, 1993 18:00
- ;
- ;___________________________________________________________________________
-
- IF &TYPE('__INCLUDINGGRAF3D__') = 'UNDEFINED' THEN
- __INCLUDINGGRAF3DEQU__ SET 1
-
- ; Equates for Graf3D
- ; Three-dimensional graphics routines layered on top of QuickDraw
- FixRad EQU 3754936 ;radConst = 57.29578
- FracRad EQU 1073741824
- ;offsets
- ;Point3D and Point2D
- x EQU 0 ;Fixed
- y EQU 4 ;Fixed
- z EQU 8 ;Fixed
- ;XfMatrix = ARRAY[0..3,0..3] OF fixed
- xf00 EQU 0
- xf01 EQU 4
- xf02 EQU 8
- xf03 EQU 12
- xf10 EQU 16
- xf11 EQU 20
- xf12 EQU 24
- xf13 EQU 28
- xf20 EQU 32
- xf21 EQU 36
- xf22 EQU 40
- xf23 EQU 44
- xf30 EQU 48
- xf31 EQU 52
- xf32 EQU 56
- xf33 EQU 60
- ;Port3D
- GrPort EQU 0 ;GrafPtr
- viewRect EQU 4 ;Rect
- xLeft EQU 12 ;Fixed
- yTop EQU 16 ;Fixed
- xRight EQU 20 ;Fixed
- yBottom EQU 24 ;Fixed
- pen EQU 28 ;Point3D
- penPrime EQU 40 ;Point3D
- eye EQU 52 ;Point3D
- hSize EQU 64 ;Fixed
- vSize EQU 68 ;Fixed
- hCenter EQU 72 ;Fixed
- vCenter EQU 76 ;Fixed
- xCotan EQU 80 ;Fixed
- yCotan EQU 84 ;Fixed
- ident EQU 88 ;BOOLEAN
- xForm EQU 90 ;XfMatrix
- szPort3D EQU 154 ;size of Port3D
-
- ;PROCEDURE InitGrf3D (globalPtr: Ptr);
- IMPORT InitGrf3D
- ;PROCEDURE Open3DPort (port: Port3DPtr);
- IMPORT Open3DPort
- ;PROCEDURE SetPort3D (port: Port3DPtr);
- IMPORT SetPort3D
- ;PROCEDURE GetPort3D (VAR port: Port3DPtr);
- IMPORT GetPort3D
- ;PROCEDURE MoveTo2D (x,y: Fixed);
- IMPORT MoveTo2D
- ;PROCEDURE MoveTo3D (x,y,z: Fixed);
- IMPORT MoveTo3D
- ;PROCEDURE LineTo2D (x,y: Fixed);
- IMPORT LineTo2D
- ;PROCEDURE LineTo3D (x,y,z: Fixed);
- IMPORT LineTo3D
- ;PROCEDURE Move2D (dx,dy: Fixed);
- IMPORT Move2D
- ;PROCEDURE Move3D (dx,dy,dz: Fixed);
- IMPORT Move3D
- ;PROCEDURE Line2D (dx,dy: Fixed);
- IMPORT Line2D
- ;PROCEDURE Line3D (dx,dy,dz: Fixed);
- IMPORT Line3D
- ;PROCEDURE ViewPort (r: Rect);
- IMPORT ViewPort
- ;PROCEDURE LookAt (left,top,right,bottom: Fixed);
- IMPORT LookAt
- ;PROCEDURE ViewAngle (angle: Fixed);
- IMPORT ViewAngle
- ;PROCEDURE Identity;
- IMPORT Identity
- ;PROCEDURE Scale (xFactor,yFactor,zFactor: Fixed);
- IMPORT Scale
- ;PROCEDURE Translate (dx,dy,dz: Fixed);
- IMPORT Translate
- ;PROCEDURE Pitch (xAngle: Fixed);
- IMPORT Pitch
- ;PROCEDURE Yaw (yAngle: Fixed);
- IMPORT Yaw
- ;PROCEDURE Roll (zAngle: Fixed);
- IMPORT Roll
- ;PROCEDURE Skew (zAngle: Fixed);
- IMPORT Skew
- ;PROCEDURE TransForm (src: Point3D; VAR dst: Point3D);
- IMPORT TransForm
- ;FUNCTION Clip3D (src1,src2: Point3D; VAR dst1,dst2: POINT): BOOLEAN;
- IMPORT Clip3D
- ;PROCEDURE SetPt3D (VAR pt3D: Point3D; x,y,z: fixed);
- IMPORT SetPt3D
- ;PROCEDURE SetPt2D (VAR pt2D: Point2D; x,y: fixed);
- IMPORT SetPt2D
-
- ENDIF ; ...already included